/*
10. Write a boolean expression that returns if the bit at position p (counting from 0) in a given integer number v has value of 1. Example: v=5; p=1 ? false.
*/
using System;

class isValueAtPositionOne
    {
        static void Main()
        {
            Console.Write("Enter an integer: ");
            int checkedNumber = int.Parse(Console.ReadLine());

            Console.Write("Enter position: ");
            int checkedPosition = int.Parse(Console.ReadLine());
			
			int mask = 1<<checkedPosition;
			if ((checkedNumber & mask) == 0) Console.WriteLine("The bit at position {0} is 0", checkedPosition);
            else Console.WriteLine("The bit at position {0} is 1",checkedPosition);      
        }
    }